local json = require('dkjson')

local data = json.decode(arg[1])

if data.newText then
  print(data.newText)
else
  print(data.insertText)
end
